package cn.song.freight.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.util.List;

/**
 * 策略区域定价添加请求DTO
 * V3版本：用于创建定价配置并关联区域的统一请求
 *
 * @author SongRenShuo
 * @version 3.0.0
 * @since 2025-08-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "策略区域定价添加请求DTO")
public class StrategyAreaPricingAddDTO {

    /**
     * 策略ID
     */
    @ApiModelProperty(value = "策略ID", required = true, example = "1")
    @NotNull(message = "策略ID不能为空")
    private Long strategyId;

    /**
     * 定价配置名称
     */
    @ApiModelProperty(value = "定价配置名称", required = true, example = "华东标准定价")
    @NotBlank(message = "定价配置名称不能为空")
    @Size(max = 100, message = "定价配置名称长度不能超过100字符")
    private String name;

    /**
     * 定价配置描述
     */
    @ApiModelProperty(value = "定价配置描述", example = "适用于华东地区的标准定价策略")
    @Size(max = 500, message = "定价配置描述长度不能超过500字符")
    private String description;

    /**
     * 首重重量（kg）
     */
    @ApiModelProperty(value = "首重重量（kg）", required = true, example = "1.0")
    @NotNull(message = "首重重量不能为空")
    @DecimalMin(value = "0.0", message = "首重重量不能为负数")
    private Double firstWeightKg;

    /**
     * 首重资费（元）
     */
    @ApiModelProperty(value = "首重资费（元）", required = true, example = "10.0")
    @NotNull(message = "首重资费不能为空")
    @DecimalMin(value = "0", message = "首重资费不能为负数")
    private Double firstWeightFee;

    /**
     * 续重重量（kg）
     */
    @ApiModelProperty(value = "续重重量（kg）", required = true, example = "1.0")
    @NotNull(message = "续重重量不能为空")
    @DecimalMin(value = "0.0", message = "续重重量不能为负数")
    private Double additionalWeightKg;

    /**
     * 续重资费（元）
     */
    @ApiModelProperty(value = "续重资费（元）", required = true, example = "5.0")
    @NotNull(message = "续重资费不能为空")
    @DecimalMin(value = "0", message = "续重资费不能为负数")
    private Double additionalWeightFee;

    /**
     * 抛重比
     */
    @ApiModelProperty(value = "抛重比（如6000表示1m³按6000kg计费），0表示不启用体积重", example = "6000.0")
    @DecimalMin(value = "0", message = "抛重比不能为负数")
    private Double volumetricWeightRatio;

    /**
     * 选中的区域ID列表
     */
    @ApiModelProperty(value = "选中的区域ID列表", required = true, example = "[1, 2, 3]")
    @NotNull(message = "区域ID列表不能为空")
    @NotEmpty(message = "请选择至少一个区域")
    private List<Long> selectedAreaIds;

    /**
     * 操作人
     */
    @ApiModelProperty(value = "操作人", example = "admin")
    @Size(max = 50, message = "操作人长度不能超过50字符")
    private String operator;
}
